package com.java.tutorials.designpattern.behavioral.template.bubblesorter;

/**
 * Created by xuzhike on 2016/3/13.
 */
public class Client {
    public static void main(String[] args) {
        int[] array={20,14,16,9,10,13,18};
        double[] dblarray={20.50,20.43,20.88,20.45,20.72};
        int i;
        IntBubbleSorter ibs=new IntBubbleSorter();
        ibs.sort(array);
        System.out.println("整型冒泡排序:");
        for(i=0;i<array.length-1;i++){System.out.print(array[i]+",");}
        DoubleBubbleSorter dbs=new DoubleBubbleSorter();
        dbs.sort(dblarray);
        System.out.println("\n双精度型冒泡排序：");
        for(i=0;i<dblarray.length-1;i++){System.out.print(dblarray[i]+",");}
    }
}
